package com.windmill.cmd.game;

import java.util.HashMap;
import java.util.Map;

public class SizeGuess implements GuessNumberGame {

    @Override
    public Map<String, String> guess(Integer right, String guess) {
	Map<String,String> result = new HashMap<String,String>();
	String sendMsg;
	if(right>Integer.parseInt(guess)){
	    sendMsg = " ^_^o您猜的数字("+guess+")小了。　";	
	    result.put("result", "0");
	}else if(right<Integer.parseInt(guess)){
	    sendMsg = " ^_^o您猜的数字("+guess+")大了。　";
	    result.put("result", "0");
	}else{
	    sendMsg = "您猜中了，正确数字为："+right+"。";
	    result.put("result", "1");
	}
	result.put("message", sendMsg);
	return result;	
    }

}
